this._propertiesChangedId = this._proxy.connect('g-properties-changed',
Lang.bind(this, this._onGeocluePropsChanged));
- this._updateMenu();
+ this._availableAccuracyLevel = this._proxy.AvailableAccuracyLevel;
this._syncIndicator();
this._proxy.AddAgentRemote('gnome-shell', Lang.bind(this, this._onAgentRegistered));
this._agent.emit_property_changed('MaxAccuracyLevel', variant);
},
- _updateMenu: function() {
- this._availableAccuracyLevel = this._proxy.AvailableAccuracyLevel;
- this.menu.actor.visible = (this._availableAccuracyLevel != 0);
- },
-
_onGeocluePropsChanged: function(proxy, properties) {
let unpacked = properties.deep_unpack();
if ("InUse" in unpacked)
this._syncIndicator();
if ("AvailableAccuracyLevel" in unpacked)
- this._updateMenu();
+ this._availableAccuracyLevel = this._proxy.AvailableAccuracyLevel;
}
});